﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Diagnostics;
using Elentok.Common.Wpf.ViewModels.Dialogs;

namespace Elentok.Common.Wpf.Dialogs
{
  /// <summary>
  /// Interaction logic for AboutDialog.xaml
  /// </summary>
  public partial class AboutDialog : Window
  {
    /// <summary>
    /// Initializes a new instance of the <see cref="AboutDialog"/> class.
    /// </summary>
    public AboutDialog(IAboutDialogViewModel viewModel)
    {
      InitializeComponent();

      this.DataContext = viewModel;
    }

    private IAboutDialogViewModel ViewModel
    {
      get { return (IAboutDialogViewModel)this.DataContext; }
    }

    private void OkButton_Click(object sender, RoutedEventArgs e)
    {
      Close();
    }

    private void HomePageHyperlink_Click(object sender, RoutedEventArgs e)
    {
      Process.Start(this.ViewModel.HomePageUrl);
    }
  }
}
